import request from '@/utils/request'
//医院列表
export function hospital(data) {
    return request({
      url: 'hospital',
      method: 'get',
      params: data,
      headers: {
        showLoading: true
      }
    })
  }
  //新增
export function hospitalCreate(data) {
    return request({
      url: 'hospital/create',
      method: 'post',
      data,
      headers: {
        showLoading: false
      }
    })
  }
  //详情
export function hospitalRead(data) {
    return request({
      url: 'hospital/read',
      method: 'get',
      params: data,
      headers:{
        'showLoading':true,
        'loadingTarget':'.innerLoding'
      }
    })
  }
  //编辑
export function hospitalUpdate(data) {
    return request({
      url: 'hospital/update',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
//状态
  export function hospitalUpdatestatus(data) {
    return request({
      url: 'hospital/updatestatus',
      method: 'put',
      data,
      headers: {
        showLoading: false
      }
    })
  }
  //删除
  export function hospitalDelete(data) {
    return request({
      url: 'hospital/delete',
      method: 'delete',
      data,
      headers: {
        showLoading: false
      }
    })
  }